package tests;

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;


public class PrePostConditions {
	public static WebDriver driver;
	
	
	@BeforeSuite
	public void setBrowserWindow(){
		driver = new FirefoxDriver();
		driver.manage().window().maximize();
		driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);	
		
	}
	
	@Parameters({"homeUrl"})
	@BeforeTest
		public void getHomePage(String homeUrl){
		driver.get(homeUrl);
		driver.manage().deleteAllCookies();
	}
	
	@AfterSuite
	public void closeWebDriversWindow(){
		driver.quit();
	}
	
	
	



}
